|
Command: |
Hash a block of data. |
|
Notes: |
It is the responsibility of the application program to ensure that the amount of data supplied in this command does not cause a buffer overflow. |
Field |
Length & Type |
Details | |
|
COMMAND MESSAGE |
|||
|
Message header |
m A |
(Subsequently returned to the Host unchanged). |
|
|
Command code |
2 A |
Value GM. |
|
|
Hash identifier |
2 N |
Identifier of the hash algorithm used to hash the data. |
|
|
Data length |
5 N |
Length of the message data to be hashed. |
|
|
Message data |
n B |
Data to be hashed. |
|
|
End message delimiter |
1 C |
Optional. Must be present if a message trailer is present. Value X’19. |
|
|
Message trailer |
n A |
Optional. Maximum length 32 characters. |
|
|
RESPONSE MESSAGE |
|||
|
Message header |
n A |
Returned to the Host unchanged. |
|
|
Response code |
2 A |
Value GN. |
|
|
Error code |
2 N |
00 : No error 05 : Invalid hash identifier 15 : Error in input data 80 : Data length error |
|
|
Hash value |
n B |
Hash result (length depends on the algorithm used) |
|
|
End message delimiter |
1 C |
Present only if present in the command message. Value X’19. |
|
|
Message trailer |
n A |
Present only if present in the command message. Maximum length 32 characters. |
|
|
|
|
|
|